home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-18 | 24.0 KB | 738 lines | [TEXT/MPS ] |
- !
- ! NetModem™ CCL script using software MNP protocol
- !
- ! Change History-
- ! v1.0 09/21/90 gs:General Release Version
- ! v1.0.2 12/07/90 gs:Create minor release version
- !
- ! The following label ranges (0-255) are defined for all scripts:
- !
- ! Label Function
- ! ----- --------
- ! 0-19 Communications Setup
- ! 20-39 Get a Modem (IBX switch thru)
- ! 40-59 Modem Setup
- ! 60-79 Dialing
- ! 80-99 Physical Connection
- ! 100-119 GEIS Logon
- ! 120-139 CICS
- ! 140-159 APPM
- ! 160-179 Online
- ! 180-199 Terminate Session
- ! 200-209 Cancel
- ! 210-219 Hangup
- ! 230-239 <UNUSED>
- ! 240-255 Disconnect
- !
- ! Note: Label 210 is the modem hangup sequence
- ! Label 240 is reserved as the start of the disconnect sequence
- !
- !================================================================================
- -LABEL 0 !***<Physical connection entry point>*** Initialize Communications
- !================================================================================
- !
- ! Select the MNPSerial Tool, initialize some parameters and open the session.
- !
- ! CTBTOOL <Toolname> [<LabelIfToolDoesn'tExist>] [<LabelIfError>] [<ctb flags>] [<buffer sizes>]
- CTBTool "MNPSerial Tool" 4 5
- ! CTBPARAMETER <ParameterName> <NewValue> [<LabelIfError>]
- CTBParameter MNPAutoEngage On 6
- CTBParameter MNPAutoengageString "CONNECT ~Baud\13" 7
- CTBParameter MNPConnectionMode Initiator 8
- CTBParameter MNPAutoEngageDelay 30 9
- CTBParameter MNPConnectAtOpen No 10
- CTBParameter MNPCloseConnectionIfMNPFails Yes 11
- CTBParameter Baud ~Baud 12
- CTBParameter Port "~MPrt" 13
- ! Dont set Data, Stop, or Parity bits for S/W MNP (defaults to 8,1,0 in the tool)
- !
- ! CTBOPEN [<LabelIfOpenFails>] [<LabelIfError>]
- CTBOpen 14 15 ! Open the Communications session
- !
- ! Flush any data, Initialize script variables and define Cancel label
- Flush ! clear input buffer and ring buffer
- CanBtn 200 ! If user cancels, take the error return
- !
- SetVar 1 0 ! #of consecutive no responses to hangup command
- SetVar 2 0 ! #of consecutive no responses to modem configuration command
- SetVar 3 0 ! #of consecutive network contact failures.
- SetVar 4 0 ! #of logon validation failures
- SetVar 5 0 ! #of consecutive CICS90 failures
- SetVar 6 0 ! #of consecutive APPM failures
- SetVar 7 0 ! flag to indicate if connecting(0) or disconnecting(1)
- SetVar 8 0 ! not used
- !
- Jump 20 ! Go to Modem Selection and Setup
- !
- !*********
- -LABEL 4 !---<MNPSerial Tool missing>---
- !*********
- Alert -1 The MNP Serial tool cannot be found in your System folder.\13Please install it, and try again.
- Exit -1 ! exit the script with an error
- !
- !*********
- -LABEL 5 !---<CTBTool Comm Toolbox err>---
- !*********
- Alert -1 A CTBTool error has occurred in the Communications Toolbox.\13Please try again.\13If the problem continues, call the Apple USA helpline.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 6 !---<CTBParameter MNPAutoengage failed>---
- !*********
- Alert -1 CTBParameter MNPAutoengage caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 7 !---<CTBParameter MNPAutoengageString failed>---
- !*********
- Alert -1 CTBParameter MNPAutoengageString caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 8 !---<CTBParameter MNPConnectionMode failed>---
- !*********
- Alert -1 CTBParameter MNPConnectionMode caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 9 !---<CTBParameter MNPAutoEngageDelay failed>---
- !*********
- Alert -1 CTBParameter MNPAutoEngageDelay caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 10 !---<CTBParameter MNPConnectAtOpen failed>---
- !*********
- Alert -1 CTBParameter MNPConnectAtOpen caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 11 !---<CTBParameter MNPCloseConnectionIfMNPFails failed>---
- !*********
- Alert -1 CTBParameter MNPCloseConnectionIfMNPFails caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 12 !---<CTBParameter Baud failed>---
- !*********
- Alert -1 CTBParameter Baud caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 13 !---<CTBParameter Port failed>---
- !*********
- Alert -1 CTBParameter Port caused an error.
- Exit -1 ! exit the script with an error.
- !
- !*********
- -LABEL 14 !---<CTBOpen failed>---
- !*********
- Alert -1 CTBOpen could not open communications.\13The serial port may already be in use.
- Exit -1 ! exit the script with an error.
- !
- !**********
- -LABEL 15 !---<CTBOpen err>---
- !**********
- Alert -1 CTBOpen caused an Communications Toolbox error.
- Exit -1 ! exit the script with an error.
- !
- !================================================================================
- -LABEL 20 !***<Modem Selection>*** Select modem through IBX switch
- !================================================================================
- !
- !================================================================================
- -LABEL 40 !***<Modem Setup>*** Modem Reset and Setup
- !================================================================================
- DsplyPic 1
- DsplyMsg Making sure the modem is ready.
- ! No need to hangup when coming into the script
- SetVar 1 0 ! clear # hangup tries counter
- !
- !**********
- -LABEL 42 ! ---<Got modem attention>---
- !**********
- DsplyMsg Setting modem parameters.
- ! Clear all previous MatchStr's and setup the modem
- MatchStr 1 42 Dummy
- Wait 30 ! Give modem .5 second to get ready before sending the attention chars
- Xmit AT
- ! Send NetModem™ commands
- Wait 3 ! Pause before "turn off the command echo" command
- Xmit E0
- Wait 3 ! Pause before "verbal result messages" command
- Xmit V1
- Wait 3 ! Pause before "select all result codes" command
- Xmit X1
- Wait 3
- Flush ! clear input buffer and send Carriage Return (CR)
- Xmit \13
- !
- ! Look for one of the following expected responses
- MatchStr 1 60 OK
- Wait 180 ! wait 3 secs
- IncVar 2 ! increment # modem setup tries
- IfVar 2 3 44 ! if 3 tries, display Modem Configuration Alert
- DsplyMsg Modem does not respond to setup commands. Retrying ...
- Jump 42 ! else try modem setup again
- !
- !**********
- -LABEL 44 ! ---<Modem configuration err>---
- !**********
- Bell
- Alert 200 The modem is not responding to setup commands.\13Turn the modem off and then on again before retrying.
- SetVar 2 0 ! clear # modem setup tries
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 60 !***<Modem ready>*** Dial phone
- !================================================================================
- DsplyMsg Dialing ~Fone ...
- DsplyPic 2
- ! Clear all previous MatchStr's (No comments on same line as MatchStr's)
- MatchStr 1 60 Dummy
- SetVar 2 0 ! clear #modem setup tries
- Wait 30 ! Give modem .5 secs to get ready before sending the attention chars
- Xmit AT
- Wait 3 ! Pause before "tone dial" command
- Xmit D~Tone
- Wait 3 ! Pause before phone number
- Xmit ~Fone
- Wait 3
- Flush ! clear input buffer and send CR
- Xmit \13
- !
- ! Look for one of the following expected responses
- MatchStr 1 80 ~Baud\13
- MatchStr 2 66 CARRIER
- MatchStr 3 70 BUSY
- MatchStr 4 74 NO DIAL
- MatchStr 5 62 ERROR
- MatchStr 6 80 1200\13
- MatchStr 7 80 2400\13
- MatchStr 8 80 4800\13
- MatchStr 9 80 9600\13
- Wait 2100 ! wait 35 secs
- !
- !**********
- -LABEL 62 !---<No response or ERROR from modem>---
- !**********
- IncVar 3 ! Increment # dial attempts counter
- IfVar 3 4 64 ! if 4 attempts, display No Dial Response Alert
- DsplyMsg Modem does not respond to Dial command. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 64 !---<No dial response err>---
- !**********
- Bell
- Alert 200 The modem is not responding to dial command.\13Make sure your modem is connected to a phone line.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 66 !---<No Carrier>---
- !**********
- IncVar 3 ! Increment # dial attempts counter
- IfVar 3 4 68 ! if 4 attempts, display No Carrier Alert
- DsplyMsg No Carrier with phone number dialed. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 68 !---<No carrier err>---
- !**********
- Bell
- Alert 200 Cannot detect carrier signal after dialing.\13Make sure the phone number provided is correct.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 70 !---<busy>---
- !**********
- IncVar 3 ! Increment # dial attempts counter
- IfVar 3 4 72 ! if 4 attempts, display Busy Alert
- DsplyMsg Phone number dialed is busy. Pause before retrying.
- Wait 300 ! wait 5 secs
- DsplyMsg Phone number dialed is busy. Retrying ....
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 72 !---<Busy err>---
- !**********
- Bell
- Alert 200 All network access lines are in use.\13Try again later.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 74 !---<No Dialtone>---
- !**********
- IncVar 3 ! Increment # dial attempts counter
- IfVar 3 4 76 ! if 4 attempts, display No Dialtone Alert
- DsplyMsg Modem reports no dial tone. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 76 !---<No dialtone Error>---
- !**********
- Bell
- Alert 200 Modem reports no dial tone.\13Make sure your modem is connected to a phone line.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 80 !***<Establish Physical Connection>*** Send H's to identify us to network
- !================================================================================
- DsplyMsg Requesting network attention
- ! Look for one of the following expected responses
- MatchStr 1 84 NO CARRIER
- MatchStr 2 100 U#
- Wait 12 ! Wait 0.2 sec before sending the first H
- Xmit H
- Wait 21 ! Wait another 0.35 sec before sending the second H
- Xmit H
- Wait 600 ! Allow 10 seconds for the U# to show up
- IncVar 3 ! No U#, increment # dial attempts counter
- IfVar 3 4 82 ! if 4 attempts, display No U# Alert
- DsplyMsg Unable to get network attention. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 82 !---<No U#>---
- !**********
- Bell
- Alert 200 Unable to get the network's attention.\13Make sure you have the correct phone number.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 84 !---<Line dropped>---
- !**********
- IncVar 3 ! Increment # dial attempts counter
- IfVar 3 4 86 ! if 4 attempts, display Line Dropped Alert
- DsplyMsg Carrier signal dropped before network recognition. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !**********
- -LABEL 86 !---<Line dropped Err>---
- !**********
- Bell
- Alert 200 Carrier signal dropped before network recognition.\13Try again.
- SetVar 3 0 ! clear # dial attempts counter
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 100 !***<GEIS logon>***
- !================================================================================
- !
- DsplyMsg Physical Connection established. Logging on to network ...
- DsplyPic 3
- SetVar 3 0 ! clear # dial attempts counter
- Wait 6 ! wait 0.1 sec
- Flush ! clear input buffer
- ! Note: leave 2 spaces between ~Dist and ~Numb
- Xmit ~User,~Dist ~Numb,~Ridn\13
- !
- ! Look for one of the following expected responses
- MatchStr 1 104 NO CARRIER
- MatchStr 2 106 DISCONNECTED
- MatchStr 3 120 ===>
- MatchStr 6 108 N FAULT,
- MatchStr 7 108 T FORMAT,
- MatchStr 8 110 L DENIED
- MatchStr 9 112 BUSY
- MatchStr 10 112 DOWN
- Wait 4200 ! wait up to 70 seconds for a response
- IncVar 4 ! Increment # logon attempts counter
- IfVar 4 3 102 ! if 3 tries, display No Login Response alert
- DsplyMsg No logon response from network. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 102 !---<No Logon response>---
- !*********
- Bell
- Alert 200 No logon response from network.\13Try again.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 104 !---<Carrier dropped>---
- !*********
- IncVar 4 ! Increment # login attempts counter
- IfVar 4 3 105 ! if 3 attempts, display Carrier dropped alert
- DsplyMsg Carrier signal dropped during network logon. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 105 !---<Carrier dropped Err>---
- !*********
- Bell
- Alert 200 Carrier signal dropped during network logon.\13Try again.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 106 !---<Session disconnected>---
- !*********
- IncVar 4 ! Increment # logon attempts counter
- IfVar 4 3 107 ! if 3 attempts, display Session disconnected alert
- DsplyMsg Network connection dropped during network logon. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 107 !---<Session disconnected Err>---
- !*********
- Bell
- Alert 200 Network connection dropped during network logon.\13Try again.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 108 !---<Validation fault>---
- !*********
- IncVar 4 ! Increment # logon attempts counter
- IfVar 4 3 109 ! see if limit of 3 is exceeded.
- DsplyMsg Network rejected your identification. Retrying ...
- Wait 60 ! wait 1 sec
- Jump 100 ! retry GEIS login (only case where we don't reset)
- !
- !*********
- -LABEL 109 !---<validation fault err>---
- !*********
- Bell
- Alert 200 Your network identification has been rejected.\13Check Setup to make sure your identification is correct.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 110 !---<Denied by host>---
- !*********
- IncVar 4 ! Increment # logon attempts counter
- IfVar 4 3 111 ! if 3 attempts, display Network Problem alert
- DsplyMsg Network host equipment problem detected. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 111 !---<Denied by host err>---
- !*********
- Bell
- Alert 200 Network host equipment problem detected.\13Try again.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 112 !---<MARK3K access busy/down>---
- !*********
- IncVar 4 ! Increment # logon attempts counter
- IfVar 4 3 113 ! if 3 attempts, display Network Busy alert
- DsplyMsg Network equipment busy/down. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 113 !---<MARK3K access busy/down err>---
- !*********
- Bell
- Alert 200 Network equipment busy or down.\13Try again.
- SetVar 4 0 ! clear # logon attempts counter
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 120 !***<MARK3000 prompt>*** Invoke CICS
- !================================================================================
- !
- DsplyMsg Requesting access to network subsystem ...
- DsplyPic 4
- Wait 6 ! wait 0.1 secs
- Flush ! clear input buffer
- !
- Xmit ~CICS\13
- ! Look for one of the following expected responses
- MatchStr 3 140 READY
- ! To overcome a network problem, the following label was changed from 124 to 126
- ! MatchStr 4 124 T BOUND
- MatchStr 4 126 T BOUND
- MatchStr 5 126 UNRECOGN
- MatchStr 6 126 ===>
- Wait 3600 ! Allow 60 secs for the expected responses to show up
- IncVar 5 ! Timeout, so increment # CICS tries counter
- IfVar 5 2 122 ! if 3 tries, display No Response alert
- DsplyMsg No response to network subsystem request. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 122 !---<No CICS err>---
- !*********
- Bell
- Alert 200 No response to network subsystem request.\13Try again.
- SetVar 5 0 ! clear # CICS tries counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 124 !---<Session not bound err>---
- !*********
- Bell
- Alert 200 Network CICS subsystem needs to be started.\13Please contact the Apple USA helpline immediately.
- Jump 200 ! jump to cancel routine
- !
- !*********
- -LABEL 126 !---<Invalid application>---
- !*********
- IncVar 5 ! Increment # CICS tries counter
- IfVar 5 3 127 ! if 3 tries, display Invalid Application alert
- DsplyMsg Network subsystem request has been rejected. Retrying ...
- Wait 60 ! wait 1 sec
- Flush
- Jump 120 ! try to access CICS again
- !
- !*********
- -LABEL 127 !---<Invalid application err>---
- !*********
- Bell
- Alert 200 The network subsystem request has been rejected.\13Try again.
- SetVar 5 0 ! clear # CICS tries counter
- Flush
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 140 !***<CICS ready>*** Start APPM transaction
- !================================================================================
- !
- DsplyMsg Requesting access to distribution center ~Dist ...
- DsplyPic 5 ! Highlight box 5 on screen
- SetVar 5 0 ! clear # CICS tries counter
- ! ! Send what needs to be sent
- Xmit ~Epgm~Dist\13
- ! Look for one of the following expected responses
- Wait 12 ! wait 0.2 secs
- Flush ! clear input buffer
- ! Look for one of the following expected responses
- MatchStr 3 160 C100
- MatchStr 4 144 INVALID
- Wait 3600 ! Allow 60 secs for the expected responses to show up
- !
- IncVar 6 ! Timeout, so Increment # APPM tries counter
- IfVar 6 2 142 ! if 2 tries, display No Transaction alert
- DsplyMsg No response to distribution center access request. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 142 !---<No transaction response>---
- !*********
- Bell
- Alert 200 No response to distribution center access.\13Try again.
- SetVar 6 0 ! reset # APPM tries counter
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 144 !---<Invalid transaction>---
- !*********
- IncVar 6 ! Increment # APPM tries counter
- IfVar 6 2 145 ! if 2 tries, display Invalid Transaction alert
- DsplyMsg Distribution center access request rejected. Retrying ...
- Jump 40 ! reset modem and try again
- !
- !*********
- -LABEL 145 !---<Invalid transaction err>---
- !*********
- Bell
- Alert 200 Distribution center access request rejected.\13Check Setup to make sure your identification is correct.
- SetVar 6 0 ! reset # APPM tries counter
- Jump 40 ! reset modem and try again
- !
- !================================================================================
- -LABEL 160 !***<Online>***
- !================================================================================
- !
- Wait 60 ! wait 1 sec
- DsplyMsg Accessing the distribution center ~Dist ...
- DsplyPic 6 ! Highlight box 6 on screen
- ! C9 = pass msg thru GE, 899 = Echo cmd
- Xmit C9899Ole\13
- ! Look for one of the following expected responses
- MatchStr 2 162 C5
- MatchStr 3 164 Ole\13
- Wait 7200 ! wait 2 minutes for echo back or distribution center nonavail msg
- !
- !*********
- -LABEL 162 !---<no luck this time>---
- !*********
- DsplyMsg Distribution center is not available ...
- Jsr 180 ! terminate session
- Bell
- Alert -1 Distribution center is not available.\13Please try again later.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 164 !---<Success, but did MNP sync up?>---
- !*********
- !
- ! CTBCHECKPARAMETER <ParameterName> <ValueToCheckAgainst>
- ! <LabelIfMatch> [<LabelIfParameterNotFound>] [<LabelIfError>]
- CTBCheckParameter MNPStatus On 170 168 169
- CTBCheckParameter MNPStatus Off 165 168 169
- CTBCheckParameter MNPStatus Connecting 166 168 169
- CTBCheckParameter MNPStatus Disconnecting 167 168 169
- !
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 Warning: The MNP Status is unknown.\13The session has been terminated.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 165 !---<MNP Status was Off>---
- !*********
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 Warning: The MNP Status is Off.\13The session has been terminated.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 166 !---<MNP Status was Connecting>---
- !*********
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 Warning: The MNP Status is Connecting.\13The session has been terminated.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 167 !---<MNP Status was Disconnecting>---
- !*********
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 Warning: The MNP Status is Disconnecting.\13The session has been terminated.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 168 !---<MNP Status was not recognized>---
- !*********
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 MNPStatus was not recognized as a valid parameter.\13Call the Apple USA HelpLine.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 169 !---<CTBCheckParameter error>---
- !*********
- DisplyMsg Error in Communications
- Jsr 180 ! terminate session
- Bell
- Alert -1 An error occurred in the CTBCheckParameter function.\13Call the Apple USA HelpLine.
- Jump 200 ! exit to Cancel routine
- !
- !*********
- -LABEL 170 !---<Success, we’re in, so exit>---
- !*********
- Wait 30 ! wait 0.5 secs
- Flush ! clear input buffer
- Exit 0 ! exit the script normally
- !
- !================================================================================
- -LABEL 180-199 !***<Terminate Session>***
- !================================================================================
- !
- !*********
- -LABEL 180 !---<Terminate session>---
- !*********
- ! send Abnormal disconnect command
- Xmit C3\13
- ! Look for one of the following expected responses
- MatchStr 1 182 U#
- Wait 300 ! wait 5 secs
- Return
- !
- !*********
- -LABEL 182 !---<Say bye>---
- !*********
- Wait 6 ! wait 0.1 sec and sign off the network
- Xmit BYE\13
- Return
- !
- !================================================================================
- -LABEL 200 !***<Cancel Routine>***
- !================================================================================
- DsplyMsg Canceling ...
- Flush
- Wait 30 ! wait 0.5 secs
- Exit -1 ! exit the script with an error
- !
- !================================================================================
- -LABEL 210 !***<Hang up phone Routine>***
- !================================================================================
- !
- ! Look for one of the following expected responses
- MatchStr 1 222 CARRIER
- SetVar 1 0 ! clear # hangup tries counter
- SetVar 2 0 ! clear # modem config tries counter and reuse for MNPStatus checks
- ! If MNP is on, turn it off first or the modem will not understand the Hangup command
- !
- ! CTBCHECKPARAMETER <ParameterName> <ValueToCheckAgainst>
- ! <LabelIfMatch> [<LabelIfParameterNotFound>] [<LabelIfError>]
- CTBCheckParameter MNPStatus Off 220 168 169
- CTBCheckParameter MNPStatus Connecting 212 168 169
- CTBCheckParameter MNPStatus Disconnecting 213 168 169
- ! CTBPARAMETER <ParameterName> <NewValue> [<LabelIfError>]
- CTBParameter MNPStatus Off 215 ! MNP was on, so turn it off
- ! Check it again, just in case
- CTBCheckParameter MNPStatus Off 220 168 169
- Jump 220 ! MNP turned off OK, so finish hanging up
- !
- !*********
- -LABEL 212 !---<MNPStatus is Connecting>---
- !*********
- IncVar 2 ! Increment # MNPstatus checks counter
- IfVar 2 3 214 ! if 3 checks, display alert and exit script with error
- Alert 200 MNPStatus is Connecting.
- Wait 30 ! wait 0.5 secs
- Jump 210 ! try to hang up again
- !
- !*********
- -LABEL 213 !---<MNPStatus is Disconnecting>---
- !*********
- IncVar 2 ! Increment # MNPstatus checks counter
- IfVar 2 3 214 ! if 3 checks, display alert and exit script with error
- Alert 200 MNPStatus is Disconnecting.
- Wait 30 ! wait 0.5 secs
- Jump 210 ! try to hang up again
- !
- !*********
- -LABEL 214 !---<MNPStatus is Connecting or Disconnecting>---
- !*********
- Alert 200 MNPStatus is still Connecting or Disconnecting.\13Script exiting with an error.
- Exit -1 ! exit the script with an error
- !
- !*********
- -LABEL 215 !---<CTBParameter Error>---
- !*********
- Alert 200 CTBParameter MNPStatus Off caused an error.\13Call the Apple USA HelpLine.
- Exit -1 ! exit the script with an error
- !
- !*********
- -LABEL 220 !---<Hang up the phone subroutine>---
- !*********
- ! Close, (pause), then reopen the connection - the NetModem™ will hangup
- !
- CTBClose
- Wait 60
- CTBOpen
- Return
- !
- !================================================================================
- -LABEL 230-239 !***<UNUSED>***
- !================================================================================
- !
- !================================================================================
- -LABEL 240 !***<Disconnection Sequence>***
- !================================================================================
- !
- ! Just flush and exit, the connection will automatically close,
- ! and NetModem™ will hangup the line.
- !
- Flush ! clear input buffer
- Exit 0 ! exit the script normally
- ###
-